package org.tote.dao;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import org.tote.model.UserLight;

@Repository
public class UserLightDaoImpl implements UserLightDao {

	@Autowired
	private SessionFactory sessionFactory;

	@Override
	public void save(UserLight user) {
		//sessionFactory.getCurrentSession().save(user);
		throw new UnsupportedOperationException();
	}

	@Override
	public void update(UserLight user) {
		//sessionFactory.getCurrentSession().merge(user);
		throw new UnsupportedOperationException();
	}

	@Override
	public void remove(UserLight user) {
		//sessionFactory.getCurrentSession().delete(user);
		throw new UnsupportedOperationException();
	}

	public UserLight getById(Long id) {
		return (UserLight) sessionFactory.getCurrentSession().get(UserLight.class, id);
	}

}